//
//  NSMutableDictionary+SetContent.m
//  Utils
//
//  Created by enghou on 2018/4/25.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "NSMutableDictionary+SetContent.h"

@implementation NSMutableDictionary (SetContent)
-(BOOL)setContent:(NSString *)value forKey:(NSString *)key conentNeeded:(BOOL)need{
    if (need) {
        if ([value isKindOfClass:[NSString class]]) {
            if ([value length] > 0) {
                [self setObject:value forKey:key];
                return YES;
            }else{
                return NO;
            }
        }
        return NO;
    }else{
        if ([value isKindOfClass:[NSString class]]) {
            if ([value length] > 0) {
                [self setObject:value forKey:key];
                return YES;
            }
        }
        return YES;
    }
}
@end
